import request from '@/utils/request'

const api_name = '/teach/video';
export default {

  //添加课时
  addVideo(video) {
    return request({
      url: `${api_name}/saveVideo`,
      method: 'post',
      data: video
    })
  },

  //根据id查询课时
  getVideo(videoId) {
    return request({
      url: `${api_name}/getVideoById/${videoId}`,
      method: 'get',
    })
  },

  //根据id修改课时
  editVideo(video) {
    return request({
      url: `${api_name}/updateVideoById/${video.id}`,
      method: 'put',
      data: video
    })
  },

  //根据id删除课时
  removeVideoById(videoId) {
    return request({
      url: `${api_name}/removeById/${videoId}`,
      method: 'delete',
    })
  },
}
